/*****************************************************************************
* Keppe Messenger (KMP) Keppe Project-Team User Messaging System
* Copyright (C) 2013-2014 Keppe Project-Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/

#ifndef NOTIFICATIONWIDGET_H
#define NOTIFICATIONWIDGET_H

#include <QString>
#include <QDialog>
#include <QPixmap>
#include <QCloseEvent>
#include <QMouseEvent>
#include "config.h"

namespace Ui {
class NotificationWidget;
}

class NotificationWidget : public QDialog
{
    Q_OBJECT

public:
    explicit NotificationWidget(QWidget *parent = 0);
    void setNotificationPixmap(QPixmap pixmap);
    void setNotificationTitle(QString title);
    void setNotificationText(QString text);
    void setNotificationBack(QString ret);
    void setNotificationShow();
    void notificationBack();
    ~NotificationWidget();

private:
    Ui::NotificationWidget *ui;
    void closeEvent(QCloseEvent *);
    bool oldCloseSelected;
    bool oldNoteSelected;
    bool alreadyClosed;
    QString noteColor;
    QString ret;
    QTimer *tn;

private slots:
    void startDisableWindow();
    void disableWindowPart();
    void checkSelection();
    void notificationColorTimer();
    void on_labClose_mousePress(QMouseEvent *);
    void on_labNotificationImage_mousePress(QMouseEvent *);
    void on_labNotificationSplit_mousePress(QMouseEvent *);
    void on_labNotificationText_mousePress(QMouseEvent *);

signals:
    void notificationPressed(QString);
};

#endif // NOTIFICATIONWIDGET_H
